"use strict";

module.exports = (appInfo) => {
  const config = (exports = {
    io: {
      namespace: {
        "/": {
          connectionMiddleware: ["auth"],
          packetMiddleware: [],
        },
      },
      redis: {
        host: "127.0.0.1",
        port: 6379,
        auth_pass: "",
        db: 0,
      },
    },
  });

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + "_{{keys}}";

  // add your config here
  // config.middleware = ["authToken"];

  config.security = {
    csrf: {
      enable: false,
    },
  };

  exports.sequelize = {
    dialect: "mysql",
    host: "127.0.0.1",
    port: 3306,
    database: "my-obj",
    username: "root",
    password: "root",
    define: {
      underscored: true,
    },
  };

  return config;
};
